package javaMetaModel;

import javaMetaModel.type.MetaType;

public abstract class MetaClassifier extends MetaType implements
		IModifiableEntity, IVisibleEntity, ICommentableEntity, IAnnotableEntity {

	protected final Visibility mVisibility = new Visibility();

	protected final Modifier mModifier = new Modifier();

	protected Annotations mAnnotations = new Annotations();

	protected Comments mComments = new Comments();

	public MetaClassifier(String aName) {
		super(utils.Tools.firstAsUpperCase(aName));
		this.getVisibility().setPublic();
	}

	@Override
	public Modifier getModifier() {
		return mModifier;
	}

	@Override
	public void setPrivate() {
		this.mVisibility.setPrivate();
	}

	@Override
	public void setProtected() {
		this.mVisibility.setProtected();
	}

	@Override
	public void setPublic() {
		this.mVisibility.setPublic();
	}

	@Override
	public boolean isAbstract() {
		return this.mModifier.isAbstract();
	}

	@Override
	public void setAbstract(boolean mIsAbstract) {
		this.mModifier.setAbstract(mIsAbstract);
	}

	@Override
	public boolean isFinal() {
		return this.mModifier.isFinal();
	}

	@Override
	public void setFinal(boolean mIsFinal) {
		this.mModifier.setFinal(mIsFinal);
	}

	@Override
	public boolean isStatic() {
		return this.mModifier.isStatic();
	}

	@Override
	public void setStatic(boolean mIsStatic) {
		this.mModifier.setStatic(mIsStatic);
	}

	@Override
	public Visibility getVisibility() {
		return mVisibility;
	}

	@Override
	public boolean isPrivate() {
		return this.mVisibility.isPrivate();
	}

	@Override
	public boolean isProtected() {
		return this.mVisibility.isProtected();
	}

	@Override
	public boolean isPublic() {
		return this.mVisibility.isPublic();
	}

	@Override
	public void addAnnotation(String aString) {
		this.mAnnotations.addAnnotation(aString);
	}

	@Override
	public Annotations getAnnotations() {
		return this.mAnnotations;
	}

	@Override
	public void removeAnnotation(String aString) {
		this.mAnnotations.removeAnnotation(aString);
	}

	@Override
	public Comments getComments() {
		return this.mComments;
	}

	@Override
	public void addComment(String aComment) {
		this.mComments.addComment(aComment);
	}

	@Override
	public boolean hasComment() {
		return this.mComments.hasComment();
	}

}
